package com.gaohe.official.service.impl;

import java.util.List;
import com.gaohe.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.official.mapper.FmAttestationMapper;
import com.gaohe.official.domain.FmAttestation;
import com.gaohe.official.service.IFmAttestationService;

/**
 * 用户认证Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-03
 */
@Service
public class FmAttestationServiceImpl implements IFmAttestationService 
{
    @Autowired
    private FmAttestationMapper fmAttestationMapper;

    /**
     * 查询用户认证
     * 
     * @param attestationId 用户认证主键
     * @return 用户认证
     */
    @Override
    public FmAttestation selectFmAttestationByAttestationId(Long attestationId)
    {
        return fmAttestationMapper.selectFmAttestationByAttestationId(attestationId);
    }

    /**
     * 查询用户认证列表
     * 
     * @param fmAttestation 用户认证
     * @return 用户认证
     */
    @Override
    public List<FmAttestation> selectFmAttestationList(FmAttestation fmAttestation)
    {
        return fmAttestationMapper.selectFmAttestationList(fmAttestation);
    }

    /**
     * 新增用户认证
     * 
     * @param fmAttestation 用户认证
     * @return 结果
     */
    @Override
    public int insertFmAttestation(FmAttestation fmAttestation)
    {
        fmAttestation.setCreateTime(DateUtils.getNowDate());
        return fmAttestationMapper.insertFmAttestation(fmAttestation);
    }

    /**
     * 修改用户认证
     * 
     * @param fmAttestation 用户认证
     * @return 结果
     */
    @Override
    public int updateFmAttestation(FmAttestation fmAttestation)
    {
        fmAttestation.setUpdateTime(DateUtils.getNowDate());
        return fmAttestationMapper.updateFmAttestation(fmAttestation);
    }

    /**
     * 批量删除用户认证
     * 
     * @param attestationIds 需要删除的用户认证主键
     * @return 结果
     */
    @Override
    public int deleteFmAttestationByAttestationIds(Long[] attestationIds)
    {
        return fmAttestationMapper.deleteFmAttestationByAttestationIds(attestationIds);
    }

    /**
     * 删除用户认证信息
     * 
     * @param attestationId 用户认证主键
     * @return 结果
     */
    @Override
    public int deleteFmAttestationByAttestationId(Long attestationId)
    {
        return fmAttestationMapper.deleteFmAttestationByAttestationId(attestationId);
    }
}
